<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>
<script>
	$.subscribe('choosePic', function(event, data) {
		//alert($("#imgOriginal").attr("src"));
		$("#fileName").attr("value", $("#originalFileName").attr("value"));
		$("#previewImg").append(
				"<img src='" + $("#imgOriginal").attr("src") + "'>");
	});
</script>

<s:url id="urlUpload" action="modul/ourcustomer/page/uploader" />

<sj:dialog id="uploadDialog" autoOpen="false" modal="true"
	title="Upload Image" width="auto" height="auto"
	closeTopics="closeDialog" />



<s:form id="insertForm" theme="bootstrap" cssClass="well"
	label="Our Customer" method="post">
	<div class="row-fluid">
		<div class="span12">
			<table>
				<tr>
					<td width="20%">Logo</td>
					<td>:</td>
					<td width="40%"><sj:a openDialog="uploadDialog"
							href="%{urlUpload}" buttonIcon="ui-icon-newwin" cssClass="btn"
							cssStyle="float:left">Upload Picture</sj:a> <s:hidden
							name="fileName" id="fileName"></s:hidden></td>
					<td rowspan="4" width="40%">
						<div id="previewImg"></div>
					</td>
				</tr>

				<tr>
					<td>Customer web site</td>
					<td>:</td>
					<td><s:textfield name="url" id="url" cssClass="input-xlarge" /></td>
				</tr>
				<tr>
					<td>Urutan Muncul</td>
					<td>:</td>
					<td><s:select list="{1,2,3,4,5,6,7,8,9,10}"
							value="{1,2,3,4,5,6,7,8,9,10}" name="orderBy"></s:select></td>
				</tr>
			</table>
		</div>
	</div>
</s:form>
